package com.spark.lola.logistics.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.spark.lola.logistics.entity.Message;
import com.spark.lola.logistics.mapper.MessageMapper;
import com.spark.lola.logistics.service.MessageService;
import com.spark.lola.support.mybatis.entity.PageParam;
import com.spark.lola.support.mybatis.entity.QueryParam;
import com.spark.lola.support.mybatis.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: Zhi-peng wang
 * @date: 2020/06/19 11:22
 **/
@Service
public class MessageServiceImpl extends BaseServiceImpl<MessageMapper, Message> implements MessageService {

    @Autowired
    private MessageMapper messageMapper;

    @Override
    public IPage<Message> findPage(QueryParam<Message> queryParam) {
        PageParam<Message> pageParam = queryParam.toPageParam();
        return messageMapper.findPage(pageParam.getPage(), pageParam.getEntityWrapper());
    }

}
